﻿using System;
using System.Text;

using BizElements.Core;
using BizElements.Core.ProviderComponents;

namespace BizElements.Core.MySql
{
    sealed class MySqlTableRenderer : ITableRenderer
    {
        public void RenderTableName(IDbTable table, StringBuilder output)
        {
            // Special characters must be enclosed by backtick characters.
            output.Append("`");
            output.Append(table.TableName);
            output.Append("`");
        }

        public void RenderAlias(IDbTable table, StringBuilder output)
        {
            // Special characters must be enclosed by backtick characters.
            output.Append("`");
            output.Append(table.Alias);
            output.Append("`");
        }
    }
}